<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: LogNormalShadowing Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00127.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">LogNormalShadowing Class Reference<div class="ingroups"><a class="el" href="a00511.html">analogueModels - AnalogueModel implementations</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="LogNormalShadowing" --><!-- doxytag: inherits="AnalogueModel" -->
<p>Channel state implementing log-normal shadowing.  
 <a href="a00127.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00400_source.html">LogNormalShadowing.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LogNormalShadowing:</div>
<div class="dyncontent">
<div class="center"><img src="a00829.png" border="0" usemap="#LogNormalShadowing_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for LogNormalShadowing:</div>
<div class="dyncontent">
<div class="center"><img src="a00830.png" border="0" usemap="#LogNormalShadowing_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00831.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b0de39b3e1ba72bcf4db51269031af9"></a><!-- doxytag: member="LogNormalShadowing::LogNormalShadowing" ref="a3b0de39b3e1ba72bcf4db51269031af9" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#a3b0de39b3e1ba72bcf4db51269031af9">LogNormalShadowing</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Takes the mean and standard deviation of the log normal distributed attenuation values as well as the inteval in which to define key entries in (accuracy of the model). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#adb196b00d9f95a77c25945aca31d8565">initFromMap</a> (const <a class="el" href="a00009.html#ab1820eb5285a02a2464be54ec651feab">ParameterMap</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the analog model from XML map data.  <a href="#adb196b00d9f95a77c25945aca31d8565"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7fd9376f5521851bd3888d99dc451c2"></a><!-- doxytag: member="LogNormalShadowing::filterSignal" ref="ac7fd9376f5521851bd3888d99dc451c2" args="(airframe_ptr_t, const Coord &amp;, const Coord &amp;)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#ac7fd9376f5521851bd3888d99dc451c2">filterSignal</a> (airframe_ptr_t, const <a class="el" href="a00065.html">Coord</a> &amp;, const <a class="el" href="a00065.html">Coord</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates shadowing loss based on a normal gaussian function. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#ab81e4e559d16d59321fe0dced4a45806">randomLogNormalGain</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a random log normal distributed gain factor.  <a href="#ab81e4e559d16d59321fe0dced4a45806"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee67e375c4b7d3c77626db7cade7dc98"></a><!-- doxytag: member="LogNormalShadowing::mean" ref="aee67e375c4b7d3c77626db7cade7dc98" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#aee67e375c4b7d3c77626db7cade7dc98">mean</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Mean of the random attenuation in dB. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca2682f5148bf872b64cb1dd6495829b"></a><!-- doxytag: member="LogNormalShadowing::stdDev" ref="aca2682f5148bf872b64cb1dd6495829b" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#aca2682f5148bf872b64cb1dd6495829b">stdDev</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Standart deviation of the random attenuation in dB. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b8e51fa4f9b3e1369cc9f882eef22ee"></a><!-- doxytag: member="LogNormalShadowing::interval" ref="a7b8e51fa4f9b3e1369cc9f882eef22ee" args="" -->
simtime_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html#a7b8e51fa4f9b3e1369cc9f882eef22ee">interval</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The interval to set attenuation entries in. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Channel state implementing log-normal shadowing. </p>
<p>An example config.xml for this <a class="el" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a> can be the following: </p>
<div class="fragment"><pre class="fragment">
	&lt;AnalogueModel type="LogNormalShadowing"&gt;
		&lt;!-- Mean attenuation in dB --&gt;
		&lt;parameter name="mean" type="double" value="0.5"/&gt;

		&lt;!-- Standart deviation of the attenuation in dB --&gt;
		&lt;parameter name="stdDev" type="double" value="0.25"/&gt;

		&lt;!-- Interval in which to define attenuation for in seconds --&gt;
		&lt;parameter name="interval" type="double" value="0.001"/&gt;
	&lt;/AnalogueModel&gt;
   </pre></div><dl class="author"><dt><b>Author:</b></dt><dd>Hermann S. Lichte, Karl Wessel (port for MiXiM) </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>2007-08-15 </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="adb196b00d9f95a77c25945aca31d8565"></a><!-- doxytag: member="LogNormalShadowing::initFromMap" ref="adb196b00d9f95a77c25945aca31d8565" args="(const ParameterMap &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool LogNormalShadowing::initFromMap </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00009.html#ab1820eb5285a02a2464be54ec651feab">ParameterMap</a> &amp;&#160;</td>
          <td class="paramname"><em>params</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the analog model from XML map data. </p>
<p>This method should be defined for generic analog model initialization.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">params</td><td>The parameter map which was filled by XML reader.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the initialization was successfully. </dd></dl>

<p>Reimplemented from <a class="el" href="a00009.html#a9c52493cdf1baa4110a83869e8bc13c5">AnalogueModel</a>.</p>

<p>References <a class="el" href="a00127.html#a7b8e51fa4f9b3e1369cc9f882eef22ee">interval</a>, <a class="el" href="a00127.html#aee67e375c4b7d3c77626db7cade7dc98">mean</a>, and <a class="el" href="a00127.html#aca2682f5148bf872b64cb1dd6495829b">stdDev</a>.</p>
<div class="fragment"><pre class="fragment">                                                               {
    ParameterMap::const_iterator it;
    <span class="keywordtype">bool</span>                         bInitSuccess = <span class="keyword">true</span>;

    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;seed&quot;</span>)) != params.end()) {
        srand( ParameterMap::mapped_type(it-&gt;second).longValue() );
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;mean&quot;</span>)) != params.end()) {
        <a class="code" href="a00127.html#aee67e375c4b7d3c77626db7cade7dc98" title="Mean of the random attenuation in dB.">mean</a> = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No mean defined in config.xml for LogNormalShadowing!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;stdDev&quot;</span>)) != params.end()) {
        <a class="code" href="a00127.html#aca2682f5148bf872b64cb1dd6495829b" title="Standart deviation of the random attenuation in dB.">stdDev</a> = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No stdDev defined in config.xml for LogNormalShadowing!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;interval&quot;</span>)) != params.end()) {
        <a class="code" href="a00127.html#a7b8e51fa4f9b3e1369cc9f882eef22ee" title="The interval to set attenuation entries in.">interval</a> = simtime_t(ParameterMap::mapped_type(it-&gt;second).doubleValue());
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No interval defined in config.xml for LogNormalShadowing!&quot;</span>);
    }

    <span class="keywordflow">return</span> <a class="code" href="a00127.html#adb196b00d9f95a77c25945aca31d8565" title="Initialize the analog model from XML map data.">AnalogueModel::initFromMap</a>(params) &amp;&amp; bInitSuccess;
}
</pre></div>
</div>
</div>
<a class="anchor" id="ab81e4e559d16d59321fe0dced4a45806"></a><!-- doxytag: member="LogNormalShadowing::randomLogNormalGain" ref="ab81e4e559d16d59321fe0dced4a45806" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double LogNormalShadowing::randomLogNormalGain </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a random log normal distributed gain factor. </p>
<p>The gain factor is below 1.0 so its an actual attenuation. </p>

<p>References <a class="el" href="a00095.html#af308407856d9835b103f2421e373ee28">FWMath::dBm2mW()</a>, <a class="el" href="a00127.html#aee67e375c4b7d3c77626db7cade7dc98">mean</a>, and <a class="el" href="a00127.html#aca2682f5148bf872b64cb1dd6495829b">stdDev</a>.</p>

<p>Referenced by <a class="el" href="a00127.html#ac7fd9376f5521851bd3888d99dc451c2">filterSignal()</a>.</p>
<div class="fragment"><pre class="fragment">                                                     {
  <span class="keywordflow">return</span> <a class="code" href="a00095.html#af308407856d9835b103f2421e373ee28">FWMath::dBm2mW</a>(-1.0 * normal(<a class="code" href="a00127.html#aee67e375c4b7d3c77626db7cade7dc98" title="Mean of the random attenuation in dB.">mean</a>, <a class="code" href="a00127.html#aca2682f5148bf872b64cb1dd6495829b" title="Standart deviation of the random attenuation in dB.">stdDev</a>));
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/analogueModel/<a class="el" href="a00400_source.html">LogNormalShadowing.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/analogueModel/LogNormalShadowing.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00127.html">LogNormalShadowing</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
